class Solution:
    def hammingWeight(self, n: int) -> int:
        cnt = 0
        while n > 0:
            cnt += (n & 1)
            n = n >> 1
        return cnt

if __name__ == '__main__':
    ret = Solution().hammingWeight(0b00000000000000000000000000001011)
    print(ret)
